import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.tsx'
import './style.less'
import { BrowserRouter, RouterProvider } from 'react-router-dom'
import { Provider } from 'react-redux'
import { ConfigProvider } from 'antd'
import { mockRuqest } from '@/mock'
import store from '@/store'
import routes from './router/index.tsx'

if(import.meta.env.MODE === 'mock') {
	mockRuqest()
}

ReactDOM.createRoot(document.getElementById('root')!).render(
	// <React.StrictMode>
		<Provider store={store}>
			<BrowserRouter>
				<ConfigProvider>
					<App />
					{/* <RouterProvider router={routes} /> */}
				</ConfigProvider>
			</BrowserRouter>
		</Provider>
	// </React.StrictMode>
)

